package com.xiaoyy.sso.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户在线表
 * </p>
 *
 * @author chenzh
 * @since 2020-06-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SYS_LOGIN_ONLINE")
@ApiModel(value="SysLoginOnline对象", description="用户在线表")
public class SysLoginOnline extends Model<SysLoginOnline> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "登入日志id")
    @TableId(value = "LOGIN_ID", type = IdType.INPUT)
    private Long loginId;

    @ApiModelProperty(value = "用户id")
    @TableField("USER_ID")
    private String userId;

    @ApiModelProperty(value = "用户名")
    @TableField("USER_NAME")
    private String userName;

    @ApiModelProperty(value = "登入所在ip")
    @TableField("LOGIN_IP")
    private String loginIp;

    @ApiModelProperty(value = "登入时间")
    @TableField("LOGIN_TIME")
    private Date loginTime;

    @ApiModelProperty(value = "登入主机")
    @TableField("LOGIN_HOST")
    private String loginHost;

    @ApiModelProperty(value = "登入key")
    @TableField("LOGIN_KEY")
    private String loginKey;

    @ApiModelProperty(value = "登入类型：微信 单点登录")
    @TableField("LOGIN_TYPE")
    private String loginType;

    @ApiModelProperty(value = "第三方id")
    @TableField("OPEN_ID")
    private String openId;

    @ApiModelProperty(value = "登入方设备id")
    @TableField("EQUIPMENT_ID")
    private String equipmentId;

    @ApiModelProperty(value = "登入方设备类型 pc app")
    @TableField("EQUIPMENT_TYPE")
    private String equipmentType;

    @ApiModelProperty(value = "登入token")
    @TableField("ACCESS_TOKEN")
    private String accessToken;

    @ApiModelProperty(value = "浏览器类型")
    @TableField("BROWSER")
    private String browser;

    @ApiModelProperty(value = "刷新token")
    @TableField("REFRESH__TOKEN")
    private String refreshToken;

    @ApiModelProperty(value = "应用id")
    @TableField("CLIENT_ID")
    private String clientId;

    @ApiModelProperty(value = "用户类型")
    @TableField("USER_TYPE")
    private String userType;

    @ApiModelProperty(value = "登录组织单位")
    @TableField("ORG_ID")
    private String orgId;

    @ApiModelProperty(value = "系统版本号")
    @TableField("VERSION")
    private String version;

    @ApiModelProperty(value = "系统编号")
    @TableField("SYSTEM_CODE")
    private String systemCode;

    @ApiModelProperty(value = "系统名称")
    @TableField("SYSTEM_NAME")
    private String systemName;


    @Override
    protected Serializable pkVal() {
        return this.loginId;
    }

}
